import { request } from '@/utils/axios/axios'
import type { LoginForm, UserInfo } from '@/api/login/type'

// 发送请求的URL
enum API {
  LOGIN_URL = '/login',
}

// 发送登录请求
export const loginRequest = (loginForm: LoginForm): Promise<UserInfo> =>
  request.post<LoginForm, UserInfo>(API.LOGIN_URL, loginForm)
